<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/mm_update/'.$cateid)?>">

	<h3>缅甸申请表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  
		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />
			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td colspan="5"><strong>Note: Please use a pen and write clearly in English using BLOCK LETTERS.</strong></td>
        </tr>
        <tr class="even">
            <td>1. Name in full</td>
            <td><input type="text" name="name" value="<?= @$info->name?>" /></td>
            <td>&nbsp;</td>
            <td>2. Father’s Name</td>
            <td><input type="text" name="father_name" value="<?= @$info->father_name?>" /></td>
        </tr>
        <tr class="odd">
            <td>3. Nationality</td>
            <td><input type="text" name="nationality" value="<?= @$info->nationality?>" /></td>
            <td>&nbsp;</td>
            <td>4. Sex</td>
            <td><input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />
              Male 
                <input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />
              Female </td>
        </tr>
        <tr class="even">
            <td>5. Date of Birth</td>
            <td><select name="birth_d"><?php for($i=1;$i<=31;$i++) echo "<option value='$i'".((@$info->birth_d==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_m"><?php for($i=1;$i<=12;$i++) echo "<option value='$i'".((@$info->birth_m==$i)?"selected":"").">$i</option>"; ?></select> - 
			<select name="birth_y"><?php for($i=date("Y");$i>1940;$i--) echo "<option value='$i'".((@$info->birth_y==$i)?"selected":"").">$i</option>"; ?></select> (Day-Month-Year)</td>
            <td>&nbsp;</td>
            <td>6. Place of Birth</td>
            <td><input type="text" name="birth_place" value="<?= @$info->birth_place?>" /></td>
        </tr>
        <tr class="odd">
            <td><p>7. Occupation(Describe your duties briefly):</p></td>
            <td colspan="4"><input name="occupation" type="text" value="<?= @$info->occupation?>" style="width:500px" /></td>
        </tr>
        <tr class="even">
          <td>8.  Personal  description:</td>
		  <td colspan="4">(a)Color of hair: 
		    <input type="text" name="hair" value="<?= @$info->hair?>" /> &nbsp;&nbsp; (b) Color of eyes:
		    <input type="text" name="eyes" value="<?= @$info->eyes?>" />
		    <br />
		    (c) Height: 
		    <input type="text" name="height" value="<?= @$info->height?>" />
&nbsp;&nbsp;(d)Complexion:
<input type="text" name="complexion" value="<?= @$info->complexion?>" /></td>
        </tr>
        <tr class="odd">
            <td>9. Passport particulars:</td>
            <td colspan="4">(a)Number: 
              <input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" />
&nbsp;&nbsp; (b) Place of issue:
<input type="text" name="travel_document_issue_place" value="<?= @$info->travel_document_issue_place?>" />
<br />
(c)Date of Issue: 
<input type="text" name="travel_document_issue_date" value="<?= @$info->travel_document_issue_date?>" id="travel_document_issue_date" />
&nbsp;&nbsp; (d) Issuing authority:
<input type="text" name="travel_document_issue_by" value="<?= @$info->travel_document_issue_by?>" />
<br />
(e) Date of expiry: 
<input type="text" name="travel_document_valid_date" value="<?= @$info->travel_document_valid_date?>" id="travel_document_valid_date" /></td>
        </tr>
        <tr class="even">
            <td>10. Type of Passport</td>
            <td colspan="4">
			<input type="radio" name="travel_document_type" value="1" <?= (@$info->travel_document_type==1)?'checked':''?>/>
              Diplomatic Passport 
              <input type="radio" name="travel_document_type" value="2" <?= (@$info->travel_document_type==2)?'checked':''?>/>
              Special/ Service  Passport  
              <input type="radio" name="travel_document_type" value="3" <?= (@$info->travel_document_type==3)?'checked':''?>/>
              Ordinary</td>
        </tr>
        <tr class="odd">
            <td>11. Permanent home address and telephone number<br />
(include apartment number, street, city, state or<br /> 
province postal code and country):</td>
            <td colspan="4">Home address: 
              <input name="home_address" type="text" value="<?= @$info->home_address?>" style="width:300px" />
              <br />
              Telephone number:              
              <input type="text" name="home_tel" value="<?= @$info->home_tel?>" /></td>
        </tr>
        <tr class="even">
            <td>12. Purpose</td>
            <td colspan="4">
            <input name="purpose" type="text" value="<?= @$info->purpose?>" style="width:500px" />
            </td>
        </tr>
		        <tr class="odd">
            <td>13. Type of Visa(Please tick one)</td>
            <td colspan="4">
			<input type="radio" name="visa_type" value="1" <?= (@$info->visa_type==1)?'checked':''?>/>
              Tourist 
              <input type="radio" name="visa_type" value="2" <?= (@$info->visa_type==2)?'checked':''?>/>              
               Business 
               <input type="radio" name="visa_type" value="3" <?= (@$info->visa_type==3)?'checked':''?>/>
               Entry 
               <input type="radio" name="visa_type" value="4" <?= (@$info->visa_type==4)?'checked':''?>/>
               Social Family Visit<br />
               <input type="radio" name="visa_type" value="5" <?= (@$info->visa_type==5)?'checked':''?>/>
               Others: 
               <input type="text" name="visa_type_other" value="<?= @$info->visa_type_other?>" /></td>
		        </tr>
        <tr class="even">
            <td>14. Address in Myanmar(include <br />
              apartment number, street, city, state or province):</td>
            <td colspan="4"><input name="myanmar_address" type="text" value="<?= @$info->myanmar_address?>" style="width:500px" /></td>
        </tr>		
        <tr class="odd">
            <td>15. Type of Entry</td>
            <td colspan="4">
			<input type="radio" name="entry_type" value="1" <?= (@$info->entry_type==1)?'checked':''?>/>
              Signle
              <input type="radio" name="entry_type" value="2" <?= (@$info->entry_type==2)?'checked':''?>/>
              Multiple</td>
        </tr>
        <tr class="even">
            <td>16. Name & address of guarantor in Myanmar<br />
              (include apartment number, street, city, state or province):</td>
            <td colspan="4">Name: 
              <input type="text" name="guarantor_name" value="<?= @$info->guarantor_name?>" />
              <br />
              Address: 
              <input name="guarantor_address" type="text" value="<?= @$info->guarantor_address?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
            <td>17. Financial resources in Myanmar:</td>
            <td colspan="4">(a) Cash (Kyats &amp;  Foreign Currency): 
              <input type="text" name="cash" value="<?= @$info->cash?>" />
              <br />
              (b) Bank deposit: 
              <input type="text" name="bank_deposit" value="<?= @$info->bank_deposit?>" />
              <br />
              (c) Name of Bank: 
              <input type="text" name="bank_name" value="<?= @$info->bank_name?>" />
              <br />
              (d) Amount: 
              <input type="text" name="amount" value="<?= @$info->amount?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">18. Attention for Applicants:
I hereby declare that I fully understand the conditions mentioned below that particulars given above are ture and correct and 
that I will not engage in any activities irrelevant to the purpose of entry stated herein.
              <br />
              (a) Apart from the professions mentioned in this visa application form, applicants shall not engage in any sort of work with or 
without charges.
              <br />
              (b) Applicants shall abide by all the law of the Republic of the Union of Myanmar and shall not interfere in the internal affairs 
of the Republic of the Union of Myanmar.<br />
(c) Legal actions will be taken against those who violate or contravene any provisions of the existing laws, rules, and 
regulations of the Republic of the Union of Myanmar.
<br />
(d) Business and Entry visa applicants shall complete item No.16 and 17 correctly.</td>
        </tr>

       
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		name:"required",
		nationality:"required",
		sex:"required",
		birth_place:"required",
		travel_document_num:"required",
		travel_document_issue_place:"required",
		travel_document_issue_date:"required",
		travel_document_valid_date:"required",
		travel_document_type:"required",
		visa_type:"required",
		entry_type:"required"
    }
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'dd/mm/yy',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);

	$("#travel_document_issue_date").datepicker();
	$("#travel_document_valid_date").datepicker();
	

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>